package com.dyh.quickdemozwei;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class FooService2 {

    @Autowired
    BarService barService;

    public void foo(){
        log.info("foo");
        barService.bar();

        new Wthread(12).run();
    }

    class Wthread extends Thread{
        int i;

        public Wthread(int i) {
            this.i = i;
        }

        @Override
        public void run() {
            log.info("{}",i);
            barService.bar();
        }
    }
}
